"""qixiaobao URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from django.urls import path, include

from qixiaobao.views import HomeView, LoginView
from shop import urls as shop
from wehelp import urls as wehelp
from common import urls as common
from open import urls as open
from order import urls as order
from callback import urls as callback
from account import urls as account
from product import urls as product
from groupshopping import urls as groupshopping
from kill import urls as kill

# 设置admin的一些参数
admin.site.site_title = '企小宝后台'
admin.site.site_header = '管理系统'
admin.site.index_title = '系统管理'

urlpatterns = [
    path('admin/', admin.site.urls),
    path('login/', admin.site.login),
    path('logout/', admin.site.logout),
    # 带支付业务路由
    url(r'^business/wehelp_', include((wehelp, 'wehelp'), namespace='wehelp')),
    url(r'^business/product_', include((product, 'product'), namespace='product')),
    url(r'^business/groupshopping_', include((groupshopping, 'groupshopping'), namespace='groupshopping')),
    url(r'^business/kill_', include((kill, 'kill'), namespace='kill')),

    url(r'^account/', include((account, 'account'), namespace='account')),
    url(r'^common/', include((common, 'common'), namespace='common')),
    url(r'^shop/', include((shop, 'shop'), namespace='shop')),
    url(r'^open/', include((open, 'open'), namespace='open')),
    url(r'^order/', include((order, 'order'), namespace='order')),
    url(r'^callback/', include((callback, 'callback'), namespace='callback')),
    url(r'^$', HomeView.as_view(), name='home'),
    # url(r'^login$', LoginView.as_view(), name='login'),
]
